const baseModel = (request) => {
	return {
		// 扩展信息采集
		view_dpServiceObjectExtend_gatherAll(query = {}) {
			return request('/bussiness/dpServiceObjectExtend/gatherAll', {
				method: 'post',
				data: query,
			})
		},
		// 根据身份证号查看服务对象所有信息
		view_dpServiceObjectAll_view(query = {}) {
			return request('/bussiness/dpServiceObject/getAll', {
				method: 'post',
				data: query,
			})
		},
		// 列表
		view_dpServiceObject_page(query = {}) {
			return request('/bussiness/dpServiceObject/page', {
				method: 'post',
				data: query,
			})
		},
		// 列表 总数统计
		view_dpServiceObject_count(query = {}) {
			return request('/bussiness/dpServiceObject/count', {
				method: 'post',
				data: query,
			})
		},
		// 采集
		view_dpServiceObject_gather(query = {}) {
			return request('/bussiness/dpServiceObject/gather', {
				method: 'post',
				data: query,
			})
		},
		// 导入
		view_dpServiceObject_import(query = {}, onUploadProgress) {
			return request('/bussiness/dpServiceObject/import', {
				method: 'post',
				headers: {
					'Content-Type': 'multipart/form-data; boundary=something',
				},
				onUploadProgress,
				data: query,
			})
		},
		// 导出
		view_dpServiceObject_exportAll(query = {}) {
			return request('/bussiness/dpServiceObject/exportAll', {
				method: 'post',
				data: query,
			})
		},
		// 导入模板下载
		view_dpServiceObject_downloadTemplate(query = {}) {
			return request('/bussiness/dpServiceObject/downloadTemplate', {
				method: 'post',
				responseType: 'blob',
				data: query,
			})
		},
		// 删除
		view_dpServiceObject_del(ids) {
			return request('/bussiness/dpServiceObject/del', {
				method: 'post',
				data: {
					batchesDel: ids,
				},
			})
		},
		// 服务对象时间轴
		view_dpServiceTimeline_page(query) {
			return request('/bussiness/dpServiceTimeline/page', {
				method: 'post',
				data: query,
			})
		},
	}
}
// 扩展信息
const extendModel = (request) => {
	return {
		// 列表
		view_dpServiceObjectExtend_page(query = {}) {
			return request('/bussiness/dpServiceObjectExtend/page', {
				method: 'post',
				data: query,
			})
		},
		// 采集
		view_dpServiceObjectExtend_gather(query = {}) {
			return request('/bussiness/dpServiceObjectExtend/gather', {
				method: 'post',
				data: query,
			})
		},
		// 导入
		view_dpServiceObjectExtend_import(query = {}, onUploadProgress) {
			return request('/bussiness/dpServiceObjectExtend/import', {
				method: 'post',
				headers: {
					'Content-Type': 'multipart/form-data; boundary=something',
				},
				onUploadProgress,
				data: query,
			})
		},
		// 导入模板下载
		view_dpServiceObjectExtend_downloadTemplate(query = {}) {
			return request('/bussiness/dpServiceObjectExtend/downloadTemplate', {
				method: 'post',
				responseType: 'blob',
				data: query,
			})
		},
		// 删除
		view_dpServiceObjectExtend_del(ids) {
			return request('/bussiness/dpServiceObjectExtend/del', {
				method: 'post',
				data: {
					batchesDel: ids,
				},
			})
		},
	}
}
// 其他信息
const otherModel = (request) => {
	return {
		// 列表
		view_dpServiceObjectOther_page(query = {}) {
			return request('/bussiness/dpServiceObjectOther/page', {
				method: 'post',
				data: query,
			})
		},
		// 详情
		view_dpServiceObjectOther_view(id) {
			return request(`/bussiness/dpServiceObjectOther/${id}`, {
				method: 'get',
			})
		},
		//编辑
		view_dpServiceObjectOther_edit(query = {}) {
			return request('/bussiness/dpServiceObjectOther/edit', {
				method: 'post',
				data: query,
			})
		},
		// 采集
		view_dpServiceObjectOther_gather(query = {}) {
			return request('/bussiness/dpServiceObjectOther/gather', {
				method: 'post',
				data: query,
			})
		},
		// 导入
		view_dpServiceObjectOther_import(query = {}, onUploadProgress) {
			return request('/bussiness/dpServiceObjectOther/import', {
				method: 'post',
				headers: {
					'Content-Type': 'multipart/form-data; boundary=something',
				},
				onUploadProgress,
				data: query,
			})
		},
		// 导入模板下载
		view_dpServiceObjectOther_downloadTemplate(query = {}) {
			return request('/bussiness/dpServiceObjectOther/downloadTemplate', {
				method: 'post',
				responseType: 'blob',
				data: query,
			})
		},
		// 删除
		view_dpServiceObjectOther_del(ids) {
			return request('/bussiness/dpServiceObjectOther/del', {
				method: 'post',
				data: {
					batchesDel: ids,
				},
			})
		},
	}
}

// 联系人
const contactModel = (request) => {
	return {
		// 列表
		view_dpServiceObjectContact_page(query = {}) {
			return request('/bussiness/dpServiceObjectContact/page', {
				method: 'post',
				data: query,
			})
		},
		// 采集
		view_dpServiceObjectContact_gather(query = {}) {
			return request('/bussiness/dpServiceObjectContact/gather', {
				method: 'post',
				data: query,
			})
		},
		// 导入
		view_dpServiceObjectContact_import(query = {}, onUploadProgress) {
			return request('/bussiness/dpServiceObjectContact/import', {
				method: 'post',
				headers: {
					'Content-Type': 'multipart/form-data; boundary=something',
				},
				onUploadProgress,
				data: query,
			})
		},
		// 导入模板下载
		view_dpServiceObjectContact_downloadTemplate(query = {}) {
			return request('/bussiness/dpServiceObjectContact/downloadTemplate', {
				method: 'post',
				responseType: 'blob',
				data: query,
			})
		},
		// 删除
		view_dpServiceObjectContact_del(ids) {
			return request('/bussiness/dpServiceObjectContact/del', {
				method: 'post',
				data: {
					batchesDel: ids,
				},
			})
		},
		// 聚合搜索
		view_search(query = {}) {
			return request('/bussiness/dpServiceObject/search', {
				method: 'post',
				data: query,
			})
		},
		// 反向全字段查询 权限为view_search
		// view_search_page(query={}) {
		//   return request('/bussiness/dpServiceObject/search/page',{
		//     method: 'post',
		//     data: query
		//   })
		// },
	}
}
// 居家老人基本信息
const dpServiceObjectHome = (request) => {
	return {
		// 通过身份证获取居家老人信息
		view_dpServiceObjectHome_info(idCard) {
			return request(`/bussiness/dpServiceObjectHome/info/${idCard}`, {
				method: 'get',
			})
		},
		// 列表分页总数
		view_dpServiceObjectHome_pageCount(query = {}) {
			return request('/bussiness/dpServiceObjectHome/pageCount', {
				method: 'post',
				data: query,
			})
		},
		// 列表分页
		view_dpServiceObjectHome_page(query = {}) {
			return request('/bussiness/dpServiceObjectHome/page', {
				method: 'post',
				data: query,
			})
		},
		// 详情
		view_dpServiceObjectHomeAll_view(query = {}) {
			return request('/bussiness/dpServiceObjectHome/getAll', {
				method: 'post',
				data: query,
			})
		},
		// 采集
		view_dpServiceObjectHome_gather(query = {}) {
			return request('/bussiness/dpServiceObjectHome/gather', {
				method: 'post',
				data: query,
			})
		},
		// 编辑
		view_dpServiceObjectHome_edit(query = {}) {
			return request('/bussiness/dpServiceObjectHome/edit', {
				method: 'post',
				data: query,
			})
		},
		// 导入
		view_dpServiceObjectHome_import(query = {}, onUploadProgress) {
			return request('/bussiness/dpServiceObjectHome/import', {
				method: 'post',
				headers: {
					'Content-Type': 'multipart/form-data; boundary=something',
				},
				onUploadProgress,
				data: query,
			})
		},
		// 导出
		view_dpServiceObjectHome_exportAll(query = {}) {
			return request('/bussiness/dpServiceObjectHome/exportAll', {
				method: 'post',
				data: query,
			})
		},
		// 导入模板下载
		view_dpServiceObjectHome_downloadTemplate(query = {}) {
			return request('/bussiness/dpServiceObjectHome/downloadTemplate', {
				method: 'post',
				responseType: 'blob',
				data: query,
			})
		},
		// 删除
		view_dpServiceObjectHome_del(ids) {
			return request('/bussiness/dpServiceObjectHome/del', {
				method: 'post',
				data: {
					batchesDel: ids,
				},
			})
		},
	}
}

// 殡葬服务对象-数据
const dpFuneralServiceObjectModel = (request) => {
	return {
		// 列表分页
		view_dpFuneralServiceObject_page(query = {}) {
			return request('/bussiness/dpFuneralServiceObject/page', {
				method: 'post',
				data: query,
			})
		},
		// 导入
		view_dpFuneralServiceObject_import(query = {}, onUploadProgress) {
			return request('/bussiness/dpFuneralServiceObject/import', {
				method: 'post',
				headers: {
					'Content-Type': 'multipart/form-data; boundary=something',
				},
				onUploadProgress,
				data: query,
			})
		},
		// 导出
		view_dpFuneralServiceObject_export(query = {}) {
			return request('/bussiness/dpFuneralServiceObject/export', {
				method: 'post',
				data: query,
			})
		},
		// 导入模板下载
		view_dpFuneralServiceObject_downloadTemplate(query = {}) {
			return request('/bussiness/dpFuneralServiceObject/downloadTemplate', {
				method: 'post',
				responseType: 'blob',
				data: query,
			})
		},
		// 删除
		view_dpFuneralServiceObject_del(ids) {
			return request('/bussiness/dpFuneralServiceObject/del', {
				method: 'post',
				data: {
					batchesDel: ids,
				},
			})
		},
	}
}

// 户籍人口-数据
const dpCrPopulationModel = (request) => {
	return {
		// 列表分页
		view_dpCrPopulation_page(query = {}) {
			return request('/bussiness/dpCrPopulation/page', {
				method: 'post',
				data: query,
			})
		},
		// 导入
		view_dpCrPopulation_import(query = {}, onUploadProgress) {
			return request('/bussiness/dpCrPopulation/import', {
				method: 'post',
				headers: {
					'Content-Type': 'multipart/form-data; boundary=something',
				},
				onUploadProgress,
				data: query,
			})
		},
		// 导出
		view_dpCrPopulation_export(query = {}) {
			return request('/bussiness/dpCrPopulation/export', {
				method: 'post',
				data: query,
			})
		},
		// 导入模板下载
		view_dpCrPopulation_downloadTemplate(query = {}) {
			return request('/bussiness/dpCrPopulation/downloadTemplate', {
				method: 'post',
				responseType: 'blob',
				data: query,
			})
		},
		// 删除
		view_dpCrPopulation_del(ids) {
			return request('/bussiness/dpCrPopulation/del', {
				method: 'post',
				data: {
					batchesDel: ids,
				},
			})
		},
	}
}
export default ({ request }: any) => ({
	...baseModel(request),
	...extendModel(request),
	...otherModel(request),
	...contactModel(request),
	...dpServiceObjectHome(request),
	...dpFuneralServiceObjectModel(request),
	...dpCrPopulationModel(request),
})
